4b03710ee5fd6353b8d01cd1a8bb2a5027ab1a85,camel-core/src/main/java/org/apache/camel/converter/jaxp/StaxConverter.java,StaxConverter,createXMLStreamReader,#Source#,99
Before Change
@Converter
public XMLStreamReader createXMLStreamReader(Source in) throws XMLStreamException {
return getInputFactory().createXMLStreamReader(in);
}
@Converter
After Change
@Converter
public XMLStreamReader createXMLStreamReader(Source in) throws XMLStreamException {
XMLInputFactory factory = getInputFactory();
try {
if (in instanceof DOMSource && !isWoodstox(factory)) {
//FIXME - if not woodstox, this will likely not work well
//likely should copy CXF's W3CDOM stuff
LOG.info("DOMSource is known to have issues with {0}. We suggest using Woodstox",
factory.getClass());
}
return factory.createXMLStreamReader(in);
} finally {
returnXMLInputFactory(factory);
}